package com.lcc.service;

import com.lcc.pojo.Book;
import com.lcc.pojo.PageBean;
import com.lcc.pojo.Query;
import com.lcc.pojo.ShoppingCart;

import java.util.List;

/**
 * /**
 *
 * @author 廖聪聪
 * @version 1.0
 * 创建时间 2020/7/23 10:54
 */

public interface BookService {
	public List<Book> findByBook(Query query, PageBean pageBean,String pg);
	public int findCount(Query query);

	public Book findByidBook(Integer bid);

	public boolean deletBookByid(String[] ids);

	public boolean addBook(Book book);

	public boolean addToCart(int id, ShoppingCart sc);

	/**
	 * 清空购物车
	 * @param sc
	 */
	public void clearShoppingCart(ShoppingCart sc);

	/**
	 * 移除指定的购物项
	 * @param sc
	 * @param id
	 */
	public void removeItemFromShoppingCart(ShoppingCart sc, int id) ;

	/**
	 * 修改购物项的数量
	 * @param sc
	 * @param id
	 * @param quantity
	 */
	public void updateItemQuantity(ShoppingCart sc, int id, int quantity);

	public void buybook(Integer num,Integer bookid,Integer accid );

}
